const defaultState = {
  startDate: '',
  endDate: '',
}

const reducer = (state = defaultState, action) => {
  switch (action.type) {
    case 'startDate':
      return { ...state, startDate: action.payload }
    case 'endDate':
      return { ...state, endDate: action.payload }
    default:
      break
  }
  return { ...state }
}

export default reducer
